package two;

class MusicBoxFactory {
	 public static MusicBox getinstance(String className){
		 MusicBox m=null;
		 if("piano".equals(className)){
			 m=new PianoBox();
		 }
		 if("violin".equals(className)){
			 m=new ViolinBox();
		 }
		 return m;
	 }

}

